<?php
namespace components;

class Base
{
	public $params = [];

	public function __set($property,$val){
		if(!property_exists($this, $property)){
			$this->params[$property] = $val;
		}
	}
	public function __get($property){
		if(property_exists($this, $property)){
			return $this->$property;
		}else{
			if(isset($this->params[$property])){
				return $this->params[$property];
			}
			throw new \Exception('property not exist:[class]:'.__CLASS__.'[property]:'.$property);
		}
	}
}